<?php
function classToOrm($class = NULL) {
  $class = strtolower($class);
  switch ($class) {
    case 'pz_ecom_category':
      require_once dirname(__FILE__) . '/ORMpz_ecom_category.class.php';
      return new ORMpz_ecom_category();
    case 'pz_ecom_customer':
      require_once dirname(__FILE__) . '/ORMpz_ecom_customer.class.php';
      return new ORMpz_ecom_customer();
    case 'pz_ecom_customer_address':
      require_once dirname(__FILE__) . '/ORMpz_ecom_customer_address.class.php';
      return new ORMpz_ecom_customer_address();
    case 'pz_ecom_customer_image':
      require_once dirname(__FILE__) . '/ORMpz_ecom_customer_image.class.php';
      return new ORMpz_ecom_customer_image();
    case 'pz_ecom_mthd_payment':
      require_once dirname(__FILE__) . '/ORMpz_ecom_mthd_payment.class.php';
      return new ORMpz_ecom_mthd_payment();
    case 'pz_ecom_mthd_shipping':
      require_once dirname(__FILE__) . '/ORMpz_ecom_mthd_shipping.class.php';
      return new ORMpz_ecom_mthd_shipping();
    case 'pz_ecom_order':
      require_once dirname(__FILE__) . '/ORMpz_ecom_order.class.php';
      return new ORMpz_ecom_order();
    case 'pz_ecom_parcel':
      require_once dirname(__FILE__) . '/ORMpz_ecom_parcel.class.php';
      return new ORMpz_ecom_parcel();
    case 'pz_ecom_point':
      require_once dirname(__FILE__) . '/ORMpz_ecom_point.class.php';
      return new ORMpz_ecom_point();
    case 'pz_ecom_product':
      require_once dirname(__FILE__) . '/ORMpz_ecom_product.class.php';
      return new ORMpz_ecom_product();
    case 'pz_ecom_product_attribute':
      require_once dirname(__FILE__) . '/ORMpz_ecom_product_attribute.class.php';
      return new ORMpz_ecom_product_attribute();
    case 'pz_ecom_product_image':
      require_once dirname(__FILE__) . '/ORMpz_ecom_product_image.class.php';
      return new ORMpz_ecom_product_image();
    case 'pz_ecom_product_option':
      require_once dirname(__FILE__) . '/ORMpz_ecom_product_option.class.php';
      return new ORMpz_ecom_product_option();
    case 'pz_ecom_purchase':
      require_once dirname(__FILE__) . '/ORMpz_ecom_purchase.class.php';
      return new ORMpz_ecom_purchase();
    case 'pz_ecom_purchase_attribute':
      require_once dirname(__FILE__) . '/ORMpz_ecom_purchase_attribute.class.php';
      return new ORMpz_ecom_purchase_attribute();
    case 'pz_ecom_purchase_option':
      require_once dirname(__FILE__) . '/ORMpz_ecom_purchase_option.class.php';
      return new ORMpz_ecom_purchase_option();
    case 'pz_ecom_transaction':
      require_once dirname(__FILE__) . '/ORMpz_ecom_transaction.class.php';
      return new ORMpz_ecom_transaction();
    case 'pz_menu':
      require_once dirname(__FILE__) . '/ORMpz_menu.class.php';
      return new ORMpz_menu();
    case 'pz_module':
      require_once dirname(__FILE__) . '/ORMpz_module.class.php';
      return new ORMpz_module();
    case 'pz_module_menu':
      require_once dirname(__FILE__) . '/ORMpz_module_menu.class.php';
      return new ORMpz_module_menu();
    case 'pz_page':
      require_once dirname(__FILE__) . '/ORMpz_page.class.php';
      return new ORMpz_page();
    case 'pz_plugin':
      require_once dirname(__FILE__) . '/ORMpz_plugin.class.php';
      return new ORMpz_plugin();
    case 'pz_plugin_instance':
      require_once dirname(__FILE__) . '/ORMpz_plugin_instance.class.php';
      return new ORMpz_plugin_instance();
    case 'pz_profile':
      require_once dirname(__FILE__) . '/ORMpz_profile.class.php';
      return new ORMpz_profile();
    case 'pz_profile_user':
      require_once dirname(__FILE__) . '/ORMpz_profile_user.class.php';
      return new ORMpz_profile_user();
    case 'pz_theme':
      require_once dirname(__FILE__) . '/ORMpz_theme.class.php';
      return new ORMpz_theme();
    default:
      return NULL;
  }
  return NULL;
}
?>
